﻿using System;
using System.Collections;
using System.Windows.Forms;

namespace RedRiver.Framework.XtraCommon.XtraControls {
    public partial class DataEditControl : UserControl  {
        public DataEditControl() {
            InitializeComponent();
            
        }

        private Type _elementType;

        public Type ElementType{
            get { return _elementType; }
            set{
                this.BindingSource.DataSource = value;
                _elementType = value;
            }
        }

        private IEnumerable _dataSource;
        private System.Windows.Forms.BindingSource _bindingSource;
        private DevExpress.XtraDataLayout.DataLayoutControl _dataLayoutControl;

        public IEnumerable DataSource{
            get { return _dataSource; }
            set{
                this.BindingSource.DataSource = value;
                _dataSource = value;
            }
        }

        public BindingSource BindingSource{
            get { return _bindingSource; }
            set { _bindingSource = value; }
        }
    }
}
